<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
  
    <title> Admin-Manage修改</title>
	<style>
	
	
	</style>
   
    <link href="css/font-awesome.min.css" rel="stylesheet">
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/templatemo-style.css" rel="stylesheet">
    
   

  </head>
  <body>  
    <!-- 左列页面 -->
    <div class="templatemo-flex-row">
      <div class="templatemo-sidebar">
        <header class="templatemo-site-header">
          <div class="square"></div>
          <h1>Admin-后台</h1>
        </header>
        <div class="profile-photo-container">
         
          <div class="profile-photo-overlay"></div>
        </div>     

        <div class="mobile-menu-icon">
            <i class="fa fa-bars"></i>
          </div>
        <nav class="templatemo-left-nav">          
          <ul>
             <li><a href="IndexQueryServlet"><i class="fa fa-home fa-fw"></i>首页</a></li>
            <li><a href="maps.jsp" class="active"><i class="fa fa-map-marker fa-fw"></i>志愿者Maps</a></li>
            <li><a href="UserGuanServlet"><i class="fa fa-users fa-fw"></i>管理用户</a></li>
            <li><a href="MoneyQueryservlet"><i class="fa fa-users fa-fw"></i>管理捐款</a></li>
            <li><a href="YuanQueryesServlet"><i class="fa fa-users fa-fw"></i>管理原因</a></li>
            <li><a href="ShiQueryesServlet"><i class="fa fa-users fa-fw"></i>管理事件</a></li>
            <li><a href="TuQueryServlet"><i class="fa fa-users fa-fw"></i>陈列馆管理</a></li>
            <li><a href="login.jsp"><i class="fa fa-eject fa-fw"></i>退出</a></li>
          </ul>  
        </nav>
      </div>
      <!-- 主要内容 --> 
      <div class="templatemo-content col-1 light-gray-bg">
        <div class="templatemo-top-nav-container">
          <div class="row">
            <nav class="templatemo-top-nav col-lg-12 col-md-12">
              <ul class="text-uppercase">
               <li><a href="IndexQueryServlet" class="active">首页</a></li>
                <li><a href="maps.jsp">志愿者地图</a></li>
                <li><a href="UserGuanServlet">管理用户</a></li>
                 <li><a href="MoneyQueryservlet">管理捐款</a></li>
                 <li><a href="YuanQueryesServlet">管理原因</a></li>
                 <li><a href="ShiQueryesServlet">管理事件</a></li>
                <li><a href="login.jsp">退出</a></li>
              </ul>  
            </nav> 
          </div>
        </div>
        <div class="templatemo-content-container">
        <h2 style="text-align: center;">用户信息管理</h2>
          <div class="templatemo-content-widget no-padding">
            <div class="panel panel-default table-responsive">
              <table class="table table-striped table-bordered templatemo-user-table">
                <thead>
                  <tr>
                    <td><a href="" class="white-text templatemo-sort-by">ID<span class="caret"></span></a></td>
                    <td><a href="" class="white-text templatemo-sort-by">职业 <span class="caret"></span></a></td>
                    <td><a href="" class="white-text templatemo-sort-by">password <span class="caret"></span></a></td>
                    <td><a href="" class="white-text templatemo-sort-by">User Name <span class="caret"></span></a></td>
                    <td><a href="" class="white-text templatemo-sort-by">性别 <span class="caret"></span></a></td>
                    <td><a href="" class="white-text templatemo-sort-by">国家 <span class="caret"></span></a></td>
                    <td><a href="" class="white-text templatemo-sort-by">Email <span class="caret"></span></a></td>
                    <td>等级</td>
                    <td>修改</td>
                    <td>注销/删除</td>
                  </tr>
                </thead>
                <tbody> 
    <c:forEach items="${requestScope.allUser}" var="use">
     <form action="updetUserServlet" method="POST">
        <tr>
            <td><input type="text" id="userid" name="userid" value="${use.id}" class="form-control" style="width:45px" readonly></td>
            <td><input type="text" id="occp" name="occp" value="${use.occupation}" class="form-control" style="width:70px"></td>
            <td><input type="text" id="opass" name="opass" value="${use.userPass}" class="form-control" style="width:85px"></td>
            <td><input type="text" id="oname" name="oname" value="${use.userName}" class="form-control" style="width:90px"></td>
            <td><input type="text" id="osex" name="osex" value="${use.sex}" class="form-control" style="width:40px"></td>
            <td><input type="text" id="ocou" name="ocou" value="${use.country}" class="form-control" style="width:60px"></td>
            <td><input type="email" id="oem" name="oem" value="${use.email}" class="form-control" style="width:150px"></td>
            <td><input type="text" id="oiden" name="oiden" value="${use.identity}" class="form-control" style="width:80px"></td>
            <td><input type="submit" id="myupdet" value="修改信息" class="templatemo-edit-btn"></td>
            <td><a href="deleteUserServlet?id=${use.id}" class="templatemo-edit-btn">删除账号</a></td>
        </tr>
        </form>
    </c:forEach>
                </tbody>
              </table>    
            </div>                          
          </div> 
          <div class="templatemo-content-container">
          <div class="templatemo-content-widget no-padding">
            <div class="panel panel-default table-responsive">
           
              <table class="table table-striped table-bordered templatemo-user-table">
                <thead>
                  <tr>
                    <td><a href="" class="white-text templatemo-sort-by">职业 <span class="caret"></span></a></td>
                    <td><a href="" class="white-text templatemo-sort-by">password <span class="caret"></span></a></td>
                    <td><a href="" class="white-text templatemo-sort-by">User Name <span class="caret"></span></a></td>
                    <td><a href="" class="white-text templatemo-sort-by">性别 <span class="caret"></span></a></td>
                    <td><a href="" class="white-text templatemo-sort-by">国家 <span class="caret"></span></a></td>
                    <td><a href="" class="white-text templatemo-sort-by">Email <span class="caret"></span></a></td>
                    <td>操作1</td>
                    <td>操作2</td>
                  </tr>
                </thead>
                 <form action="InsertUser" >
                <tbody>
                  <tr>
                    <td><input id="ocp" name="ocp" type="text" class="form-control" style="width:50px"></td>
                    <td><input id="password" name="password" type="text" class="form-control" style="width:70px"></td>
                    <td><input id="nameuser" name="nameuser" type="text" class="form-control" style="width:70px"></td>
                    <td><input id="sexs" name="sexs" type="text" class="form-control" style="width:40px"></td>
                    <td><input id="cou" name="cou" type="text" class="form-control" style="width:55px"></td>
                    <td><input id="eami" name="eami" type="email" class="form-control" style="width:90px"></td>
                     <td><button type="button" id="resets" class="templatemo-blue-button">重置</button></td>
                    <td><button type="submit" class="templatemo-blue-button">添加</button></td>
                  </tr>                       
                </tbody> 
                </form>
              </table> 
                 
            </div>                          
           </div>                   
          
          <div class="templatemo-flex-row flex-content-row">
            <div class="col-1">
              <div class="panel panel-default margin-10">
                <div class="panel-heading"><h2 class="text-uppercase">查询列表</h2></div>
                <div class="panel-body">
                  <form action="mAllUserServlet" id="querys" class="templatemo-login-form">
                  <div class="form-group">
                  <div class="form-group">
                      <label for="inputEmail">id</label>
                      <input type="text" class="form-control" name="id" id="id" placeholder="Enter ID">
                    </div>
                      <label for="inputocp" id="inputocp">职业</label>
                      <input type="text" class="form-control" id="Occupation" name="Occupation" placeholder="Enter 职业">
                    </div>
                    <div class="form-group">
                      <label for="inputEmail" id="inputEmails">Email</label>
                      <input type="email" class="form-control" id="inputEmail" name="inputEmail" placeholder="Enter 电子邮件">
                    </div>
                     <div class="form-group">                      
                      <label for="inputSex" id="inputSex">性别</label>
                      <input type="text" class="form-control" id="sex" name="sex" placeholder="Enter 性别">                                 
                    </div>     
                    <div class="form-group">                      
                      <label for="inputcou" id="inputocu">国家</label>
                      <input type="text" class="form-control"id="country" name="country" placeholder="Enter 国籍">                                 
                    </div>       
                    <div class="form-group">
                      <label for="inputName" id="inputName">userName</label>
                      <input type="text" class="form-control" id="username" name="username" placeholder="Enter 用户名">
                    </div>
                    <div class="form-group">                      
                      <label for="inputPass" id="inputPass">Password</label>
                      <input type="text" class="form-control" id="pass" name="pass" placeholder="Enter 密码">                                 
                    </div>              
                    <div class="form-group">
                        <div class="checkbox squaredTwo">
                        </div>            
                    </div>
                    <div class="form-group">
                      <button type="submit" id="ques" class="templatemo-blue-button">查询</button>
                      <button type="button" id="que" class="templatemo-blue-button">可视化查询</button>
                      <button type="button" id="res" class="templatemo-blue-button">重置</button>
                    </div>
                  </form>
                </div>                
              </div>              
            </div>
            
          </div> <!--信息显示 -->
          <div class="templatemo-flex-row flex-content-row">
            <div class="templatemo-content-widget white-bg col-2">
              <i class="fa fa-times"></i>
              <div class="media margin-bottom-30">
                <div class="media-left padding-right-25">
                  <a href="#">
                    <img class="media-object img-circle templatemo-img-bordered" src="images/${requestScope.User[0].avatar}" alt="Sunset">
                  </a>
                </div>
                <div class="media-body">
                  <h2 class="media-heading text-uppercase blue-text">${requestScope.User[0].userName}</h2>
                  <p>${requestScope.User[0].identity}</p>
                </div>        
              </div>
              <div class="table-responsive">
                <table class="table">
                  <tbody>
                    <tr>
                      <td><div class="circle green-bg"></div></td>
                       <td>密码</td>
                      <td>${requestScope.User[0].userPass}</td>                      
                    </tr> 
                    <tr>
                      <td><div class="circle pink-bg"></div></td>
                      <td>邮箱</td>
                      <td>${requestScope.User[0].email}</td>                    
                    </tr>  
                    <tr>
                      <td><div class="circle blue-bg"></div></td>
                      <td>国家</td>
                      <td>${requestScope.User[0].country}</td>                 
                    </tr>  
                    <tr>
                      <td><div class="circle yellow-bg"></div></td>
                      <td>性别</td>
                      <td>${requestScope.User[0].sex}</td>                    
                    </tr> 	                                    
                  </tbody>
                </table>
              </div>             
            </div>
            <div class="templatemo-content-widget white-bg col-1 text-center templatemo-position-relative">
              <i class="fa fa-times"></i>
              <img src="images/person.jpg" alt="Bicycle" class="img-circle img-thumbnail margin-bottom-30">
              <h2 class="text-uppercase blue-text margin-bottom-5">ID:${requestScope.User[0].id}</h2>
              <h3 class="text-uppercase margin-bottom-70">职业：${requestScope.User[0].occupation}</h3>
              <div class="templatemo-social-icons-container">
                <div class="social-icon-wrap">
                  <a href="index.jsp"><i class="fa fa-facebook templatemo-social-icon"></i></a>  
                </div>
                <div class="social-icon-wrap">
                  <a href="index.jsp"><i class="fa fa-envelope-o templatemo-social-icon"></i> </a> 
                </div>
                <div class="social-icon-wrap">
                  <a href="index.jsp"><i class="fa fa-mobile templatemo-social-icon"></i> </a> 
                </div>                
              </div>
            </div>
            <div class="templatemo-content-widget white-bg col-1 templatemo-position-relative templatemo-content-img-bg">
              <img src="images/${requestScope.User[0].photo}" alt="Sunset" class="img-responsive content-bg-img">
              <i class="fa fa-heart"></i>
              <h2 class="templatemo-position-relative white-text">PHOTO</h2>

              

              </div>              
            </div>
          </div>
         
          <footer class="text-right">
           <!--  <p>Copyright &copy; 2084 Company Name 
            | Designed by <a href="http://www.templatemo.com" target="_parent">templatemo</a></p> -->
          </footer>         
        </div>
      </div>
    </div>
    
    <!-- JS -->
    <script type="text/javascript" src="js/jquery-1.11.2.min.js"></script>      <!-- jQuery -->
    <script type="text/javascript" src="js/templatemo-script.js"></script>
    <script>
    
    $("#que").bind("click",function(){
		if( $("#id").val() === ''){
			  alert("可视化查询id必须填写，其他信息不用填写");
		  }else{
			  $ ("#querys").attr("action","absoluteQuery")
			  $("#querys").submit();
		  }
   });	 
    $("#resets").bind("click",function(){
		 $("#ocp").val('');
		 $("#password").val('');
		 $("#nameuser").val('');
		 $("#cou").val('');
		 $("#sexs").val('');
		 $("#eami").val('');
  });	 
    $("#res").bind("click",function(){
		 $("#id").val('');
		 $("#username").val('');
		 $("#userpass").val('');
		 $("#country").val('');
		 $("#sex").val('');
		 $("#pass").val('');
		 $("#inputEmail").val(''); 
  });
  $("#resetss").bind("click",function(){
		 $("#ocps").val('');
		 $("#nameusers").val('');
		 $("#passwords").val('');
		 $("#sexss").val('');
		 $("#cous").val('');
		 $("#eamis").val('');
		 $("#yuan").val(''); 
});
  $("#sresets").bind("click",function(){
		 $("#socp").val('');
		 $("#snameuser").val('');
		 $("#spassword").val('');
		 $("#one").val('');
		 $("#to").val(''); 
		 $("#b").val(''); 
		 $("#c").val(''); 
		 $("#d").val(''); 
		 $("#e").val(''); 
		 $("#a").val(''); 
  });
    </script>   
  </body>
</html>